import { request } from '@/framework/utils/request-jdz';

// 高级查询审批单
export const getSeniorFrom = (params) => {
  return request(
    {
      url: '/spec/bill/complex/list',
      method: 'get',
      params,
    },
    {
      isGetDataDirectly: false,
    },
  );
};

// 获取审批单列表
export const getApprovalList = (params) => {
  return request(
    {
      url: '/spec/bill/list',
      method: 'get',
      params,
    },
    {
      isGetDataDirectly: false,
    },
  );
};

//审批单提交
export const putSaveApproval = (params) => {
  return request(
    {
      url: '/spec/bill/put',
      method: 'put',
      data: params,
    },
    {
      isGetDataDirectly: false,
    },
  );
};
// 审批单详情
export const getApprovalDetails = (params) => {
  return request(
    {
      url: `/spec/bill/${params.id}`,
      method: 'get',
      params,
    },
    {
      isGetDataDirectly: false,
    },
  );
};
// 删除审批单
export const delApproval = (params) => {
  return request(
    {
      url: '/spec/bill/del',
      method: 'delete',
      data: params,
    },
    {
      isGetDataDirectly: false,
    },
  );
};
